package com.nsoft.server.serviceImpl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.nsoft.server.service.main.AccountService;
import com.nsoft.server.service.main.GCService;
import com.nsoft.server.service.main.PartyService;
import com.nsoft.server.service.main.UserService;
import com.nsoft.server.service.main.VechileService;

public class FacadeFactoryImpl {

	private static ApplicationContext springContext;
	static {
		springContext = new ClassPathXmlApplicationContext(
				new String[] { "com/nsoft/server/resources/jpa-application-complete-context.xml" });

	}
	public static UserService getUserService() {
		return (UserService) springContext.getBean("userservice");
	}
	
	public static PartyService getPartyService() {
		return (PartyService) springContext.getBean("partyservice");
	}
	
	public static VechileService getVechileService() {
		return (VechileService) springContext.getBean("vechileservice");
	}
	
	public static AccountService getAccountService() {
		return (AccountService) springContext.getBean("accountservice");
	}
	
	public static GCService getGCService() {
		return (GCService) springContext.getBean("gcService");
	}
	
}
